#ifndef HYBRIDWINDOW_H
#define HYBRIDWINDOW_H

#include <SFML/Graphics.hpp>
#include <QTimer.h>
#include "World.h"
#include <QShowEvent>
#include <QPaintEvent>
#include <QPaintEngine>
#include <QWidget>

class HybridWidget : public QWidget, public sf::RenderWindow
{
    Q_OBJECT
private :
    static unsigned int frameTime;
    bool   initialized;
    QTimer timer;
    World* world;

    QPaintEngine* paintEngine() const;
    void showEvent(QShowEvent*);
    void paintEvent(QPaintEvent*);

public :
    HybridWidget(QWidget* Parent);

signals:
    void closed();
};
#endif // HYBRIDWINDOW_H
